DevJourney

NodeJS/geeksforgeekstutorial/File Server/File Management/Delete File/server.js

var fs = require('fs');

fs.unlink('mynewfile2.txt', function (err) {
  if (err) throw err;
  console.log('File deleted!');
});
View on GitHub